package com.project.bean;

import java.util.ArrayList;
import java.util.List;

public class CutPageBean<T>{
    /**当前页数据*/
    private List<T> list = new ArrayList<>();
    /**总记录数*/
    private Integer count;
    /**总页数*/
    private Integer totalPage;
    /**每页显示记录数*/
    public static final int PAGESIZE =3;

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
        this.totalPage=count%PAGESIZE == 0 ? count/PAGESIZE : count/PAGESIZE+1;
    }

    public Integer getTotalPage() {
        return totalPage;
    }



    @Override
    public String toString() {
        return "CutPageBean{" +
                "list=" + list +
                ", count=" + count +
                ", totalPage=" + totalPage +
                '}'+"\n";
    }
}
